package com.hc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 博客浏览历史
 *
 * @author 梁云亮
 */
@ApiModel(value = "Domain:UserBlogBrowse")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_user_blog_browse")
public class UserBlogBrowse implements Serializable {
    private static final long serialVersionUID = -8926583251347163683L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "主键")
    private Integer id;

    /**
     * 用户编号
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "用户编号")
    private Integer userId;

    /**
     * 博客编号
     */
    @TableField(value = "blog_id")
    @ApiModelProperty(value = "博客编号")
    private Integer blogId;

    /**
     * 登录方式：app-1，微信小程序-2，支付宝小程序3，PC网页-4，手机网页-5
     */
    @TableField(value = "device")
    @ApiModelProperty(value = "登录方式：app-1，微信小程序-2，支付宝小程序3，PC网页-4，手机网页-5")
    private Integer device;

    /**
     * 用户IP
     */
    @TableField(value = "ip")
    @ApiModelProperty(value = "用户IP")
    private String ip;

    /**
     * 打开博客时间
     */
    @TableField(value = "open_time")
    @ApiModelProperty(value = "打开博客时间")
    private LocalDateTime openTime;

    /**
     * 用户浏览博客持续时间，单位s
     */
    @TableField(value = "duration")
    @ApiModelProperty(value = "用户浏览博客持续时间，单位s")
    private Integer duration;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

}
